package com.test.redis.controller;

import com.test.redis.manager.RedisManager;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName ResultController
 * @Author lulei
 * @Data 2020/3/10 21:46
 */

@RestController
public class ResultController {

    @Resource
    RedisManager redisManager;

    @RequestMapping(value = "/addMsg")
    public Object test() {

        redisManager.addKeyAddValue();

        return "ok!";
    }

    @RequestMapping(value = "/getMsg")
    public Object getTest() {

        Object value = redisManager.getValue();

        return value;
    }
}
